package D12_6z.调用方法;

import java.lang.reflect.Method;

public class Demo1 {
    public static void main(String[] args) throws Exception {
        Class<?> aClass = Class.forName("Y2019.M12_.D12_6z.调用方法.Dog");
        Method cell = aClass.getDeclaredMethod("cell");
        cell.setAccessible(true);
        Object o = aClass.newInstance();
        cell.invoke(o,null);
        Method sleep = aClass.getDeclaredMethod("sleep");
        sleep.setAccessible(true);
        sleep.invoke(o,null);
    }
}
